package com.corona.game;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.g2d.Sprite;
import com.corona.Game;
import com.corona.game.util.TextureCache;
import java.util.ArrayList;

/* compiled from: Battle.java */
/* access modifiers changed from: package-private */
/* loaded from: pokewilds.jar:com/pkmngen/game/BattleIntro.class */
public class BattleIntro extends Action {
    Sprite frame;
    public Action.Layer layer = Action.Layer.gui_139;
    ArrayList<Sprite> frames = new ArrayList<>();

    public BattleIntro(Action nextAction) {
        super(new Object[0]);
        this.nextAction = nextAction;
        this.frames.add(null);
        this.frames.add(null);
        Sprite sprite1 = new Sprite(TextureCache.get(Gdx.files.internal("battle/intro_frame1.png")));
        this.frames.add(sprite1);
        this.frames.add(sprite1);
        Sprite sprite2 = new Sprite(TextureCache.get(Gdx.files.internal("battle/intro_frame2.png")));
        this.frames.add(sprite2);
        this.frames.add(sprite2);
        Sprite sprite3 = new Sprite(TextureCache.get(Gdx.files.internal("battle/intro_frame3.png")));
        this.frames.add(sprite3);
        this.frames.add(sprite3);
        this.frames.add(sprite2);
        this.frames.add(sprite2);
        this.frames.add(sprite1);
        this.frames.add(sprite1);
        this.frames.add(null);
        this.frames.add(null);
        Sprite sprite4 = new Sprite(TextureCache.get(Gdx.files.internal("battle/intro_frame4.png")));
        this.frames.add(sprite4);
        this.frames.add(sprite4);
        Sprite sprite5 = new Sprite(TextureCache.get(Gdx.files.internal("battle/intro_frame5.png")));
        this.frames.add(sprite5);
        this.frames.add(sprite5);
        Sprite sprite6 = new Sprite(TextureCache.get(Gdx.files.internal("battle/intro_frame6.png")));
        this.frames.add(sprite6);
        this.frames.add(sprite6);
        this.frames.add(sprite5);
        this.frames.add(sprite5);
        this.frames.add(sprite4);
        this.frames.add(sprite4);
        ArrayList<Sprite> cpyFrames = new ArrayList<>(this.frames);
        this.frames.addAll(cpyFrames);
        this.frames.addAll(cpyFrames);
        this.frames.add(null);
        this.frames.add(null);
    }

    @Override // com.corona.game.Action
    public String getCamera() {
        return "gui";
    }

    @Override // com.corona.game.Action
    public Action.Layer getLayer() {
        return this.layer;
    }

    @Override // com.corona.game.Action
    public void step(Game game) {
        this.frame = this.frames.get(0);
        if (this.frame != null) {
            this.frame.setScale(3.0f);
            this.frame.setPosition(0.0f, 0.0f);
            this.frame.draw(game.uiBatch);
        }
        this.frames.remove(0);
        if (this.frames.isEmpty()) {
            game.insertAction(this.nextAction);
            game.actionStack.remove(this);
        }
    }
}
